## Process this file with automake to generate Makefile.in
ACLOCAL_AMFLAGS = -I m4 --install
DISTCHECK_CONFIGURE_FLAGS = --enable-examples
EXTRA_DIST = examples/WTFPL-2
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = $(SDL_CFLAGS)
AM_CXXFLAGS = $(SDL_CFLAGS)
## XXX: texi2dvi and texi2pdf currently fail horribly when working out
##      of a different subdirectory to the texinfo file. Until this is
##      fixed, just subdir the doc generation.
SUBDIRS = doc

libtool: $(LIBTOOL_DEPS)
	$(SHELL) ./config.status --recheck

pkgconfig_DATA = fake437.pc fake437++.pc

include_HEADERS = include/fake437.h include/fake437.hpp
fake437dir = $(includedir)/fake437
fake437_HEADERS = \
	include/fake437/display.h \
	include/fake437/display.hpp \
	include/fake437/primitive.h \
	include/fake437/surface.h \
	include/fake437/surface.hpp \
	include/fake437/types.h

lib_LTLIBRARIES = libfake437.la libfake437++.la

libfake437_la_SOURCES = \
	src/libfake437/display.c \
	src/libfake437/primitive.c \
	src/libfake437/surface.c \
	src/libfake437/fonts.h \
	src/libfake437/font_8x8.c \
	src/libfake437/font_8x8_thin.c \
	src/libfake437/font_8x14.c
libfake437_la_LDFLAGS = $(SDL_L_FLAGS) -no-undefined -version-info 7:0:0
libfake437_la_LIBADD = -lSDL

libfake437___la_SOURCES = \
	src/libfake437++/display.cpp \
	src/libfake437++/surface.cpp
libfake437___la_LDFLAGS = $(SDL_L_FLAGS) -no-undefined -version-info 3:0:0
libfake437___la_LIBADD = libfake437.la

if ENABLE_EXAMPLES
noinst_PROGRAMS = \
	examples/display \
	examples/example \
	examples/guy \
	examples/surface

examples_display_SOURCES = examples/display.c
examples_display_LDADD = $(SDL_LIBS) libfake437.la

examples_example_SOURCES = examples/example.c
examples_example_LDADD = $(SDL_LIBS) libfake437.la

examples_guy_SOURCES = examples/guy.cpp
examples_guy_LDADD = $(SDL_LIBS) libfake437++.la

examples_surface_SOURCES = examples/surface.c
examples_surface_LDADD = $(SDL_LIBS) libfake437.la
endif
